package com.xzz.cloud.alibaba.service.impl;

import com.xzz.cloud.alibaba.dao.StorageDao;
import com.xzz.cloud.alibaba.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author: hhz
 * @createDate: 2021-4-6
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {
    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("--->storage-service中扣减库存开始");
        storageDao.decrease(productId, count);
//        int i = 1/0;
        log.info("------->storage-service中扣减库存结束");

    }
}
